<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html>
<html style="background:balck;">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<link href="http://www.clantrip.com/static/bootstrap-font/css/bootstrap.min.css" rel="stylesheet">
   
   
<style type="text/css">
	.foot-c{
		background:#ccc;
		text-align:center;
		height:200px;
		line-height:200px;
	}
</style>
<title>文章列表</title>
</head>
<body>

<div>
	<h1>文章列表</h1>
	<ul>
		<c:forEach var="t" items="${articles}" >
			<li>
				<h3>${t.title}</h3>
				<p>${t.content}</p>
				<p>${t.publishDate}</p>
				<p><a href="./del.do?id=${t.id}">删除</a></p>
			</li>
		</c:forEach>
	</ul>
	</div>
	
	<ul>
		<c:forEach var="t" items="${articles}">
			<li>
				<h3>标题：${t.title}</h3>
				<p>文章：${t.content}</p>
				<p>时间：${t.publishDate}</p>
				<p>
					<a href="./del.do?id=${t.id}">删除</a>
				</p>
			</li>
		</c:forEach>
	</ul>
	<ul class="pagination">
		<li class="${currentPage == 0 ? 'disabled' : ''}"><a
			href="./list.do?page=${currentPage == 0 ? currentPage : currentPage - 1}">
				<span>&laquo;</span>
		</a></li>


		<c:if test="${currentPage < 5}">
			<c:forEach var="page" begin="0" end="${currentPage + 4}">
				<li class="${currentPage == page ? 'active' : ''}"><a
					href="./list.do?page=${page}">${page}</a></li>
			</c:forEach>
			<li class="disabled"><a>...</a></li>
			<li><a href="./list.do?page=${total}">${total}</a></li>
		</c:if>


		<c:if test="${currentPage >= 5 && currentPage <= total -5}">
			<li><a href="./list.do?page=${0}">${0}</a></li>
			<li class="disabled"><a>...</a></li>
			<c:forEach var="page" begin="${currentPage - 3}"
				end="${currentPage + 4}">
				<li class="${currentPage == page ? 'active' : ''}"><a
					href="./list.do?page=${page}">${page}</a></li>
			</c:forEach>
			<li class="disabled"><a>...</a></li>
			<li><a href="./list.do?page=${total}">${total}</a></li>
		</c:if>

		<c:if test="${currentPage > total - 5}">
			<li><a href="./list.do?page=0">0</a></li>
			<li class="disabled"><a>...</a></li>
			<c:forEach var="page" begin="${total -5}" end="${total}">
				<li class="${currentPage == page ? 'active' : ''}"><a
					href="./list.do?page=${page}">${page}</a></li>
			</c:forEach>
		</c:if>

		<li class="${currentPage == total ? 'disabled' : ''}"><a
			href="./list.do?page=${currentPage == total ? currentPage : currentPage+ 1}">
				<span>&raquo;</span>
		</a></li>
	</ul>
	
	
<nav class="navbar navbar-default navbar-fixed-top">
        <div class="container">
            <!-- Brand and toggle get grouped for better mobile display -->
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                   <button type="button" class="btn btn-default btn-lg">
  <span class="glyphicon glyphicon-home" aria-hidden="true"></span> MyBlogs
</button>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
               
            </div>
       
            <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
                                <ul class="nav navbar-nav navbar-right">
                    <li class="active"><a href="http://www.clantrip.com">首页 <span class="sr-only">(current)</span></a><p class="line-top hidden-xs"></p></li>
                                        <li><a href="#">技术指南</a></li>
                                        <li><a href="#">前端类库</a></li>
                                        <li><a href="#">技术服务</a></li>
                                        <li><a href="#">Java资讯</a></li>
                                        
                                    </ul>
                            </div>
        </div>
        
    </nav>
    
	
	<div class="col-sm-12 contact-banner-box">
                <h2 class="h1">更多疑问 全面解答</h2>
                <h4>资深专家在线为您解答所有疑惑</h4>
                <a href="javascript:;" class="btn btn-outline-inverse btn-lg web-chat">免费咨询</a>
            </div>
            
            <div class="container">
        <div class="row">
            <div class="col-xs-6 col-sm-2 footer-item">
                <div class="footer-list">
                    <h4>常用工具</h4>
                    <ul>
                        <li><a href="#" target="_blank">IP查询</a></li>
                        <li><a href="#">建站工具</a></li>
                        <li><a href="#">资料下载</a></li>
                    </ul>
                </div>
            </div>
            <div class="col-xs-6 col-sm-2 footer-item">
                <div class="footer-list">
                    <h4>快捷裢接</h4>
                    <ul>
                        <li><a href="#">后端资讯</a></li>
                        <li><a href="#">Git指南</a></li>
                        <li><a href="#">常见问题</a></li>
                    </ul>
                </div>
             </div>
            <div class="col-xs-6 col-sm-2 footer-item">
                <div class="footer-list">
                    <h4>关于我们</h4>
                    <ul>
                        <li><a href="#">关于站长</a></li>s
                        <li><a href="#">服务协议</a></li>
                        <li><a href="#">收藏本站</a></li>
                    </ul>
                </div>
            </div>
            <div class="col-xs-6 col-sm-2 footer-item">
                <div class="footer-wechat">
                    <img class="img-responsive" src="http://www.clantrip.com/static/images/wechat.png">
                    <p>微信<sapn class="hidden-sm">号:</sapn>18157960464</p>
                </div>
            </div>
            
        </div>
    </div>
    <section>
            <p class="foot-c">
            Copyright © 2006-2017 冯申杰的博客
            </p>
    </section>       
            
</body>
</html>